/*package com.hdoit.ares.web.cust.wechat;

import java.util.HashMap;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.hdoit.ares.web.wechat.MsgTemplate;
import com.tennetcn.common.logical.wechat.model.WechatOperateLog;
import com.tennetcn.common.logical.wechat.service.IWechatOperateLogService;
import com.tennetcn.common.message.WechatLoginModel;
import com.tennetcn.common.utils.JsonUtils;
import com.tennetcn.component.wechat.BaseWechat;

@Controller
@RequestMapping(value="/wechat/cust/MessageList/")
public class MessageListWechat extends BaseWechat{

	@Override
	public String getRoutePath() {

		return "areas/wechat/cust/MessageList/";
	}

	private IWechatOperateLogService wechatOperateLogService;

	public IWechatOperateLogService getWechatOperateLogService() {
		return wechatOperateLogService;
	}

	@Resource
	public void setWechatOperateLogService(IWechatOperateLogService wechatOperateLogService) {
		this.wechatOperateLogService = wechatOperateLogService;
	}
	
	private final String messageListViewName = "messageList";
	
	@RequestMapping(value = messageListViewName, method = { RequestMethod.GET,RequestMethod.POST },produces = "text/plain;charset=utf-8")
	public String messageList(Model model){
		
		WechatLoginModel loginModel = wechatSession.getCurrentLogin();
		WechatOperateLog message = wechatOperateLogService.queryModel(loginModel.getUserId());
		String contex=message.getContextData();
		HashMap<String, Object> contexMap = JsonUtils.convert2Map(contex);	
		//新会员加入通知
		String newVipJoin=MsgTemplate.newVipJoin;	
		//申请成功通知
		String applyForSuccess=MsgTemplate.applyForSuccess;
		//申请失败通知
		String applyForFail=MsgTemplate.applyForFail;
		//关注成功通知
		String attentionSuccess=MsgTemplate.attentionSuccess;
		//订单支付成功通知
		String orderPaySuccess=MsgTemplate.orderPaySuccess;
		//每日奖金通知
		String awardPaySuccess=MsgTemplate.awardPaySuccess;
		//报价成功通知
		String tomeasureSuccess=MsgTemplate.tomeasureSuccess;
		 
		String templateId = (String) contexMap.get("templateId");
		String content = null;
		if(templateId==newVipJoin){
			@SuppressWarnings("unchecked")
			HashMap<String, Object> data = (HashMap<String, Object>) contexMap.get("data");	
			content=(String) data.get("first");
			System.err.println("+++++++++++++++++++++++++++++++++++++"+content);
		}
		if(templateId==applyForSuccess){
			content="";
		}
		if(templateId==applyForFail){
			content="";
		}
		if(templateId==attentionSuccess){
			content="";
		}
		if(templateId==orderPaySuccess){
			content="";
		}
		if(templateId==awardPaySuccess){
			content="";
		}
		if(templateId==tomeasureSuccess){
			content="";
		}
		model.addAttribute("message",message);
		model.addAttribute("content",content);
		return view(messageListViewName);
	}
}
*/